[Typing][B-92] Add type annotations for python/paddle/batch.py#66295
Merged
SigureMo merged 12 commits intoPaddlePaddle:developfrom Jul 23, 2024
Merged
[Typing][B-92] Add type annotations for python/paddle/batch.py#66295SigureMo merged 12 commits intoPaddlePaddle:developfrom
python/paddle/batch.py#66295SigureMo merged 12 commits intoPaddlePaddle:developfrom
Conversation
|
你的PR提交成功,感谢你对开源项目的贡献! |
SigureMo
requested changes
Jul 20, 2024
Member
SigureMo
left a comment
There was a problem hiding this comment.
这已经是第三次提示了,按照 PR-CI-Codestyle-Check 报错提示运行 pre-commit
python/paddle/batch.py
Outdated
| from typing import TYPE_CHECKING, Generator, List, TypeVar | ||
|
|
||
| if TYPE_CHECKING: | ||
| from types import ModuleType |
Contributor
Author
There was a problem hiding this comment.
这是没有用的,在新的提交中已经将其删除。
python/paddle/batch.py
Member
喔,抱歉看错人了,这是第一次 😂 |
megemini
reviewed
Jul 21, 2024
python/paddle/batch.py
Outdated
Comment on lines
+26
to
+27
| reader: Generator[T, None, None], batch_size: int, drop_last: bool = False | ||
| ) -> Generator[List[T], None, None]: |
Contributor
There was a problem hiding this comment.
Suggested change
| reader: Generator[T, None, None], batch_size: int, drop_last: bool = False | |
| ) -> Generator[List[T], None, None]: | |
| reader: Callable[[], Generator[_T, None, None]], batch_size: int, drop_last: bool = False | |
| ) -> Callable[[], Generator[list[_T], None, None]]: |
Co-authored-by: Nyakku Shigure <sigure.qaq@gmail.com>
Co-authored-by: Nyakku Shigure <sigure.qaq@gmail.com>
SigureMo
reviewed
Jul 22, 2024
python/paddle/batch.py
Outdated
|
|
||
| def batch(reader, batch_size, drop_last=False): | ||
| def batch( | ||
| reader: Generator[T, None, None], batch_size: int, drop_last: bool = False |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Category
User Experience
PR Types
Improvements
Description
类型标注:
Related links
@SigureMo @megemini